package com.ruoyi.nongjt.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

/**
 * 合格证信息表
 *
 * @TableName njt_certificate_print
 */
@Data
public class NjtCertificatePrint {
    /**
     * 主键ID
     */
    @Excel(name = "用户id")
    private Long id;
    private List<Long> ids;
    /**
     * 账号
     */
    @Excel(name = "账号")
    private String account;
    /**
     * 生产主体
     */
    @Excel(name = "生产主体")
    private String productionEntity;
    /**
     * 法人姓名
     */
    @Excel(name = "法人姓名")
    private String legalPerson;
    /**
     * 省
     */
    @Excel(name = "省")
    private String province;
    /**
     * 市
     */
    @Excel(name = "市")
    private String city;
    /**
     * 区县
     */
    @Excel(name = "区县")
    private String district;
    /**
     * 镇/乡
     */
    @Excel(name = "镇/乡")
    private String town;
    /**
     * 详细地址
     */
    @Excel(name = "企业地址")
    private String companyAddress;
    /**
     * 生产地址
     */
    @Excel(name = "生产地址")
    private String productionAddress;
    /**
     * 食用农产品名称
     */
    @Excel(name = "食用农产品名称")
    private String productName;
    /**
     * 重量(数量)
     */
    @Excel(name = "重量(数量)")
    private BigDecimal quantity;
    /**
     * 单位
     */
    @Excel(name = "单位")
    private String unit;
    /**
     * 合格方式
     */
    @Excel(name = "合格方式")
    private String qualifiedMethod;
    /**
     * 检验机构
     */
    @Excel(name = "检验机构")
    private String inspectionOrg;
    /**
     * 检测报告URL
     */
    @Excel(name = "检测报告URL")
    private String reportUrl;
    /**
     * 检测报告名称
     */
    @Excel(name = "检测报告名称")
    private String reportName;
    /**
     * 开具日期
     */
    @Excel(name = "开具日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date issueDate;
    /**
     * 合格证编号
     */
    @Excel(name = "合格证编号")
    private String certificateNo;
    /**
     * 打印次数
     */
    @Excel(name = "打印次数")
    private Integer printCount;

    /**
     * 扫描次数
     */
    @Excel(name = "扫描次数")
    private Integer scanCount;

    /**
     * 数据来源
     */
    @Excel(name = "数据来源")
    private String dataSource;
    /**
     * 是否删除(0:未删除,1:已删除)
     */
    @Excel(name = "是否删除(0:未删除,1:已删除)")
    private Integer isDeleted;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新时间
     */
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 创建用户ID
     */
    @Excel(name = "创建用户ID")
    private Long createUserId;
    /**
     * 单位ID，用于权限控制
     */
    @Excel(name = "单位ID，用于权限控制")
    private Long unitId;
    private String createBy;
    private String updateBy;
    private Date startTime;       // 开始日期
    private Date endTime;         // 结束日期
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        NjtCertificatePrint other = (NjtCertificatePrint) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
                && (this.getProductionEntity() == null ? other.getProductionEntity() == null : this.getProductionEntity().equals(other.getProductionEntity()))
                && (this.getLegalPerson() == null ? other.getLegalPerson() == null : this.getLegalPerson().equals(other.getLegalPerson()))
                && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
                && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
                && (this.getDistrict() == null ? other.getDistrict() == null : this.getDistrict().equals(other.getDistrict()))
                && (this.getTown() == null ? other.getTown() == null : this.getTown().equals(other.getTown()))
                && (this.getCompanyAddress() == null ? other.getCompanyAddress() == null : this.getCompanyAddress().equals(other.getCompanyAddress()))
                && (this.getProductionAddress() == null ? other.getProductionAddress() == null : this.getProductionAddress().equals(other.getProductionAddress()))
                && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
                && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
                && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
                && (this.getQualifiedMethod() == null ? other.getQualifiedMethod() == null : this.getQualifiedMethod().equals(other.getQualifiedMethod()))
                && (this.getInspectionOrg() == null ? other.getInspectionOrg() == null : this.getInspectionOrg().equals(other.getInspectionOrg()))
                && (this.getReportUrl() == null ? other.getReportUrl() == null : this.getReportUrl().equals(other.getReportUrl()))
                && (this.getReportName() == null ? other.getReportName() == null : this.getReportName().equals(other.getReportName()))
                && (this.getIssueDate() == null ? other.getIssueDate() == null : this.getIssueDate().equals(other.getIssueDate()))
                && (this.getCertificateNo() == null ? other.getCertificateNo() == null : this.getCertificateNo().equals(other.getCertificateNo()))
                && (this.getPrintCount() == null ? other.getPrintCount() == null : this.getPrintCount().equals(other.getPrintCount()))
                && (this.getScanCount() == null ? other.getScanCount() == null : this.getScanCount().equals(other.getScanCount()))
                && (this.getDataSource() == null ? other.getDataSource() == null : this.getDataSource().equals(other.getDataSource()))
                && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
                && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
                && (this.getUnitId() == null ? other.getUnitId() == null : this.getUnitId().equals(other.getUnitId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
        result = prime * result + ((getProductionEntity() == null) ? 0 : getProductionEntity().hashCode());
        result = prime * result + ((getLegalPerson() == null) ? 0 : getLegalPerson().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getDistrict() == null) ? 0 : getDistrict().hashCode());
        result = prime * result + ((getTown() == null) ? 0 : getTown().hashCode());
        result = prime * result + ((getCompanyAddress() == null) ? 0 : getCompanyAddress().hashCode());
        result = prime * result + ((getProductionAddress() == null) ? 0 : getProductionAddress().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getQualifiedMethod() == null) ? 0 : getQualifiedMethod().hashCode());
        result = prime * result + ((getInspectionOrg() == null) ? 0 : getInspectionOrg().hashCode());
        result = prime * result + ((getReportUrl() == null) ? 0 : getReportUrl().hashCode());
        result = prime * result + ((getReportName() == null) ? 0 : getReportName().hashCode());
        result = prime * result + ((getIssueDate() == null) ? 0 : getIssueDate().hashCode());
        result = prime * result + ((getCertificateNo() == null) ? 0 : getCertificateNo().hashCode());
        result = prime * result + ((getPrintCount() == null) ? 0 : getPrintCount().hashCode());
        result = prime * result + ((getScanCount() == null) ? 0 : getScanCount().hashCode());
        result = prime * result + ((getDataSource() == null) ? 0 : getDataSource().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
        result = prime * result + ((getUnitId() == null) ? 0 : getUnitId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", account=").append(account);
        sb.append(", productionEntity=").append(productionEntity);
        sb.append(", legalPerson=").append(legalPerson);
        sb.append(", province=").append(province);
        sb.append(", city=").append(city);
        sb.append(", district=").append(district);
        sb.append(", town=").append(town);
        sb.append(", companyAddress=").append(companyAddress);
        sb.append(", productionAddress=").append(productionAddress);
        sb.append(", productName=").append(productName);
        sb.append(", quantity=").append(quantity);
        sb.append(", unit=").append(unit);
        sb.append(", qualifiedMethod=").append(qualifiedMethod);
        sb.append(", inspectionOrg=").append(inspectionOrg);
        sb.append(", reportUrl=").append(reportUrl);
        sb.append(", reportName=").append(reportName);
        sb.append(", issueDate=").append(issueDate);
        sb.append(", certificateNo=").append(certificateNo);
        sb.append(", printCount=").append(printCount);
        sb.append(", scanCount=").append(scanCount);
        sb.append(", dataSource=").append(dataSource);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", createUserId=").append(createUserId);
        sb.append(", unitId=").append(unitId);
        sb.append("]");
        return sb.toString();
    }
}